/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.nViron.Tiles;

import instar.dg.Tiles.Tile;
import java.awt.Image;

/**
 *
 * @author Stefan
 */
public class TileSE extends Tile {
    
    Image img = null;

    public Image getImage() {
        if ( img == null  && data != null ) {
//            Debug.out.println( System.currentTimeMillis() + " ms - [" + Thread.currentThread().getName() + "] TileSE.getImage().createImage()" );
        try
        {
            img = java.awt.Toolkit.getDefaultToolkit().createImage(data, 0, data.length);
        }
        catch (Exception ex) {}
       }
        return img;
    }

    public void setImage( Image img ) {
        this.img = img;
    }

    @Override
    public void clear() {
        super.clear();
        img = null;
    }

}
